package com.jindy.module.statement.domain;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.jindy.module.machine.domain.Machine;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.jindy.common.annotation.Excel;
import com.jindy.common.core.domain.BaseEntity;

/**
 * 结算单对象 t_statement
 *
 * @author ruoyi
 * @date 2022-10-27
 */
@Data
public class Statement extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    private Long id;

    /** 合同模板 */
    @Excel(name = "合同模板")
    private String contractTemplate;

    /** 发起人 */
    @Excel(name = "发起人")
    private Long sponsor;

    /** 发起人名称 */
    @Excel(name = "发起人名称")
    private String sponsorName;

    /** 业务员 */
    @Excel(name = "业务员")
    private Long salesman;

    /** 业务员名称 */
    @Excel(name = "业务员名称")
    private String salesmanName;

    /** 信息提供人 */
    @Excel(name = "信息提供人")
    private Long informationProvider;

    /** 信息提供人名称 */
    @Excel(name = "信息提供人名称")
    private String informationProviderName;

    /** 申请日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "申请日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date applyDate;

    /** 编号 */
    @Excel(name = "编号")
    private String number;

    /** 客户 */
    @Excel(name = "客户")
    private Long customerId;

    /** 客户名称 */
    @Excel(name = "客户名称")
    private String customerName;

    /** 业务所属公司 */
    @Excel(name = "业务所属公司")
    private String businessCompany;

    /** 订单id */
    @Excel(name = "订单id")
    private Long orderId;

    /** 订单编号 */
    @Excel(name = "订单编号")
    private String orderNo;

    /** 项目地区域 */
    @Excel(name = "项目地区域")
    private String projectArea;

    /** 起租日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "起租日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date startDate;

    /** 到租日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "到租日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endDate;

    /** 使用天数 */
    @Excel(name = "使用天数")
    private Long usedDays;

    /** 日租金合计 */
    @Excel(name = "日租金合计")
    private BigDecimal totalDailyRent;

    /** 应收租金 */
    @Excel(name = "应收租金")
    private BigDecimal rentReceivable;

    /** 租金折让金额 */
    @Excel(name = "租金折让金额")
    private BigDecimal rentAllowanceAmount;

    /** 折让说明 */
    @Excel(name = "折让说明")
    private String rentAllowanceDescription;

    /**
关联特殊事项审批单 */
    @Excel(name = " 关联特殊事项审批单")
    private String relationApprovalForm;

    /** 其他费用总额 */
    @Excel(name = "其他费用总额")
    private BigDecimal totalOtherExpenses;

    /** 实收租金 */
    @Excel(name = "实收租金")
    private BigDecimal rentPaid;

    /** 实收押金 */
    @Excel(name = "实收押金")
    private BigDecimal depositPaid;

    /** 应退押金 */
    @Excel(name = "应退押金")
    private BigDecimal refundableDeposit;

    /** 对账单附件 */
    @Excel(name = "对账单附件")
    private String accountStatementAttachments;

    /** 退款帐户名称、帐号 */
    @Excel(name = "退款帐户名称、帐号")
    private String accountNumber;

    /** 帐户信息附件 */
    @Excel(name = "帐户信息附件")
    private String accountAttachments;

    /** 应扣费用总额 */
    @Excel(name = "应扣费用总额")
    private BigDecimal totalDeductibleExpenses;

    /** 物流费用总额 */
    @Excel(name = "物流费用总额")
    private BigDecimal totalLogisticsExpenses;

    /** 维修费用总额 */
    @Excel(name = "维修费用总额")
    private BigDecimal totalMaintenanceCost;

    /** 预估项目毛利 */
    @Excel(name = "预估项目毛利")
    private BigDecimal estimateProjectProfit;

    /** 签订人id */
    @Excel(name = "签订人id")
    private Long signRenId;

    /** 签订人名称 */
    @Excel(name = "签订人名称")
    private String signRenName;

    /** 协同人 */
    @Excel(name = "协同人")
    private Long collaborator;

    /** 协同人名称 */
    @Excel(name = "协同人名称")
    private String collaboratorName;

    /** 状态（1正常） */
    @Excel(name = "状态", readConverterExp = "1=正常")
    private String status;

    /** 删除标志（0代表存在 2代表删除） */
    private String delFlag;

    /**
     * 收取客户其他费用
     */
    private List<OtherExpenses> otherExpensesList;
    /**
     * 项目应扣费用对象
     */
    private List<DeductibleExpenses> deductibleExpensesList;
    /**
     * 物流及辅料费用对象
     */
    private List<LogisticsExpenses> logisticsExpensesList;
    /**
     * 维修、配件费用对象
     */
    private List<MaintenanceCost> maintenanceCostList;

    /**
     *结算机器费用对象
     */
    private List<StatementExpenses> statementExpensesList;

    private List<Map<String,Object>> machineList;

//    /**
//     * 查看权限（用户id)
//     */
//    private Long userId;

    /** 是否超权限(1是,2否) */
    @Excel(name = "是否超权限")
    private String purview;

    /** 未收款是否已到账（1是 2否） */
    @Excel(name = "未收款是否已到账")
    private String uncollectedStatus;

    /** 开户行名称 */
    @Excel(name = "开户行名称")
    private String openingBank;

    /** 未收金额 */
    @Excel(name = "未收金额")
    private BigDecimal uncollected;

    /** 最后实收金额 */
    @Excel(name = "最后实收金额")
    private BigDecimal  payAmount;
}
